<?php if ($pager->haveToPaginate()): ?>
  <div class="pagination">
    <a href="<?php echo url_for($route_list) / 1 ?>1">
      <img src="/images/first.png" alt="First page" title="First page" />
    </a>
  
    <a href="<?php echo url_for($route_list) . "/" . $pager->getPreviousPage() ?>">
      <img src="/images/previous.png" alt="Previous page" title="Previous page" />
    </a>

  <?php
  foreach ($pager->getLinks() as $page) {
    if ($page == $pager->getPage())
      echo $page;
    else
      echo "<a href=\"" . url_for($route_list) . "/" . $page . "\">" . $page . "</a>";
  } ?>

  <a href="<?php echo url_for($route_list) . "/" . $pager->getNextPage() ?>">
    <img src="/images/next.png" alt="Next page" title="Next page" />
  </a>

  <a href="<?php echo url_for($route_list) . "/" . $pager->getLastPage() ?>">
    <img src="/images/last.png" alt="Last page" title="Last page" />
  </a>
</div>
<?php endif; ?>